Skip to content

Conversation

@lilyydu
Copy link
Contributor

@lilyydu lilyydu commented Nov 6, 2025

resolves: #367

  • exposed a new config option called ClientSettings thats passed into our clients from the app layer
  • the tokenUrl specifies the regional token endpoint to use (e.g., europe.token.botframework)

I didn't reuse OauthSettings because
a) its associated w/ the Apps ecosystem vs ClientSettings is concerned w the API layer
b) eventually may diverge with additional params
b) would cause circular dependencies

  • tested with the graph sample, works w/ global and a west-europe regional bot
  • add tests

INSTRUCTIONS FOR SETTING UP
(documenting here for now, should add to docs, partial courtesy to @Benjiiim):

const app = new App({
oauth: {
defaultConnectionName: 'graph',
// This is an example of overriding the token URL for a specific region (e.g., Europe).
// Uncomment this block if needed.
// clientSettings: {
// tokenUrl: "https://europe.token.botframework.com",
// }
},
logger: new ConsoleLogger('@tests/auth', { level: 'debug' })
});

resources:

@Benjiiim
Copy link

Benjiiim commented Nov 6, 2025

Loving it 😍 Thanks a lot @lilyydu for your work on this.

I have several comments after going through the changes.

Have you considered using OAuthUrl as the setting's name instead of tokenUrl? I understand the choice for tokenUrl as it is the URL to get the token but the bot service doc talks about OAuth URL in OAuth URL support in Azure AI Bot Service for example so it might be good to be aligned.

Regarding the instructions for setting up:

  • I don't think you should touch the azure.bicep file as resourceGroup().location will get the resource group location automatically + the resource group location doesn't change anything regarding the bot service resource location.
  • You should document the change needed in manifest.json as well. *.botframework.com should be replaced by europe.token.botframework.com (or equivalent for other locations)
  • I will be glad to have a look at the doc when time will come

Regarding the CLI templates:

  • If you choose to add a comment to define the tokenURL in index.ts, you might want to do the same with the validdomain in manifest.json.
  • And you might want to do that for the template applied when running config add atk.oauth to change the reply url in the aad.manifest.json file and the location in azurebot.bicep.
  • Instead of comments everywhere, I'm wondering if env variables won't be better? A discussion with M365 toolkit might be useful in that case to align the templates.
  • An other option would be to rely only on the documentation without touching the templates

@lilyydu lilyydu merged commit 13334d6 into main Nov 11, 2025
10 checks passed
@lilyydu lilyydu deleted the lilyydu/expose-vals branch November 11, 2025 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSO - Support of regional Azure bots

6 participants